package com.forenow.demo.demo12;

public class Adventure {
    public static void main(String[] args) {
        Hero hb=new Hero();
        hb.fight();
        hb.fly();
        hb.swim();
        CanFly cf=hb;
        cf.fly();
        CanSwim cs=hb;
        cs.swim();
        ActionCharacter ac=hb;
        ac.fight();
        ac.speak("Hello world");
    }

}
